<?php

include '../function.php';

// 索引数组 

$arr = [78,"广州",[45,45,23,2],90,789];

echo $arr[2][2];

$arr = array();
$arr[0]=90;

//关联数组
//
$arr = ['name'=>"张三",'age'=>18,'sex'=>'男'];

$arr = array(
		array(
		'name'=>"张三",
		'age'=>18,
		'sex'=>'男'
		),
		array(
		'name'=>"李四",
		'age'=>28,
		'sex'=>'男'
		),
		array(
		'name'=>"王五",
		'age'=>38,
		'sex'=>'女'
		)
	);

// 作业：[45,23,2,667,5,53,3,3]
 ?>
 <!doctype html>
 <html lang="en">
 <head>
 	<meta charset="UTF-8">
 	<title>Document</title>
 </head>
 <body>
 	<table border="1">
 		<tr>
 			<td>姓名</td>
 			<td>性别</td>
 			<td>年龄</td>
 		</tr>
 		<?php foreach ($arr as $k => $v) { ?>
 			<tr>
	 			<td><?php echo $v['name'] ?></td>
	 			<td><?php echo $v['sex'] ?></td>
	 			<td><?php echo $v['age'] ?></td>
	 		</tr>
 		<?php } ?>
 	</table>
 </body>
 </html>